﻿@{
    ViewBag.Title = "Security";
    Layout = "~/Views/Shared/_Member.cshtml";
    RooHui.Infrastructure.Entities.Entity.Member member = ViewBag.Member;
}
<div class="container" style="margin-top: 20px; min-height: 600px;">
    <div class="row">
        <div class="span3" style="padding-top:20px;">
            <ul class="nav nav-tabs nav-stacked">
                <li><a href="/member/memberinfo">帐户基本</a></li>
                <li class="active"><a href="javascript:;">帐户密码</a></li>
                <li><a href="/member/notice">系统消息</a></li>
                @*<li><a href="/member/coupon">彩卷</a></li>*@
            </ul>
        </div>
        <div class="span9">
            <div class="headline">
                <h2>
                    修改登录密码</h2>
            </div>
            <div class="tag-box tag-box-v2">
                <form id="form" action="/member/security" method="post" class="form-horizontal">
                @if (!String.IsNullOrEmpty(ViewBag.Message))
                { 
                    <div class="alert alert-error">
                    @ViewBag.Message
                    </div>
                }
                @if (ViewBag.Sueess != null && ViewBag.Sueess)
                { 
                    <div class="alert alert-success">新密码已生效！</div>
                }
                <div class="control-group">
                    <label class="control-label" for="inputEmail">
                        原密码：</label>
                    <div class="controls">
                        <input type="password" id="txtpassword" class="{required:true,minlength:6,maxlength:18}" name="password" placeholder="请输入原密码" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="inputPassword">
                        新密码：</label>
                    <div class="controls">
                        <input type="password" id="txtnewpassword" class="{required:true,minlength:6,maxlength:18}" name="newpassword" placeholder="请输入新密码" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="inputPassword">
                        确认密码：</label>
                    <div class="controls">
                        <input type="password" id="txtconfirm" class="{required:true,equalTo:'#txtnewpassword'}" name="confirm" placeholder="请再次输入密码" />
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">
                        <button type="submit" class="btn-u">
                            确定</button>
                    </div>
                </div>
                </form>
            </div>
        </div>
    </div>
</div>
@section scripts{
    <script type="text/javascript" src="/content/plugins/jquery-validate/jquery.validate.js"></script>
    <script type="text/javascript" src="/content/plugins/jquery-validate/jquery.metadata.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#labsetting').addClass('active'); 
            $('#form').validate({
                errorClass: "help-inline",
                errorElement: "span",
                highlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').addClass('error');
                },
                unhighlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').removeClass('error');
                }
            });
        });
    </script>
}
